﻿using System.ComponentModel;
using System.Windows;
using TfsComLib.TfsBranchLib2;

namespace TfsBranchLib2.View
{
    /// <summary>
    ///     Interaction logic for SourceControlFilterEditPopup.xaml
    /// </summary>
    public partial class SourceControlFilterEditPopup : Window
    {
        private ISourceControlFilter sourceControlFilter;

        public SourceControlFilterEditPopup()
        {
            InitializeComponent();
        }

        public SourceControlFilterEditPopup(ISourceControlFilter sourceControlFilter) : this()
        {
            this.sourceControlFilter = sourceControlFilter;
            sourceControlFilterEditBox.SetBindings(sourceControlFilter);
        }

        private void Window_Closing_1(object sender, CancelEventArgs e)
        {
            sourceControlFilterEditBox.UpdateSourceControlFilterFromTfsItems();
        }
    }
}